package com.demo.service.impl;

import com.demo.dao.LeaveDao;
import com.demo.dao.impl.LeaveDaoImpl;
import com.demo.entity.Leaveapplication;
import com.demo.service.LeaveService;

import java.io.Serializable;
import java.util.Map;

public class LeaveServiceImpl implements LeaveService {
    public void add(Leaveapplication vo) {
        //你看这个对象是哪个
        LeaveDao leaveDao = new LeaveDaoImpl();

        leaveDao.add(vo);
    }

    //@Override
    public void delete(long id) {
        LeaveDao leaveDao = new LeaveDaoImpl();

        leaveDao.delete(id);
    }

    //@Override
    public void update(Leaveapplication vo) {
        LeaveDao leaveDao = new LeaveDaoImpl();

        leaveDao.update(vo);
    }

    //@Override
    public Leaveapplication get(Serializable id) {
        LeaveDao leaveDao = new LeaveDaoImpl();
        return leaveDao.get(id);
    }

    //@Override
    public Map<String, Object> list(Map<String, Object> params) {
        LeaveDao leaveDao = new LeaveDaoImpl();
        return leaveDao.list(params);
    }

    @Override
    public boolean refuse(long id) {
        LeaveDao leaveDao = new LeaveDaoImpl();
        return leaveDao.refuse(id);
    }

    @Override
    public boolean agree(long id) {
        LeaveDao leaveDao = new LeaveDaoImpl();
        return leaveDao.agree(id);
    }
}
